<template>
	<div class="swiper-container swper1">
	    <div class="swiper-wrapper">
	        <div class="swiper-slide" v-for="(item,i) in homeSwperimgs"><img v-bind:src="item.src"></div>
	    </div>
	    <!-- 如果需要分页器 -->
	    <div class="swiper-pagination"></div>
	</div>
</template>
<style type="text/css">
	.swiper-slide img{
		width: 100%;
	}
	.swiper-container{
		padding-bottom: 0;
	}

</style>

<script type="text/javascript">
	export default {
		data(){
			return {
				homeSwperimgs:[
					{src:"http://img09.yiguoimg.com/e/items/2017/170206/9288700889047622_1125x652.jpg"},
					{src:"http://img10.yiguoimg.com/e/items/2017/170206/9288700889014854_1125x652.jpg"},
					{src:"http://img14.yiguoimg.com/e/items/2017/170208/9288700933808712_1125x652.jpg"},
					{src:"http://img14.yiguoimg.com/e/items/2017/170206/9288700881969734_1125x652.jpg"}
				],
				text:""
			}
		},
		mounted(){
			var mySwiper = new Swiper ('.swper1', {
		    direction: 'horizontal',
		    loop: true,
		    autoplay:5000,
		    
		    // 如果需要分页器
		    pagination: '.swiper-pagination',
		  });
			// var bus=new Vue();
			// var _this=this;
			// bus.$on("text",function(data){
			// 	_this.text=data;
			// 	console.log(this.text);
			// });	
		}

	}

</script>